package ThreadDemo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 阿宾
 * Date: 2025-03-20
 * Time: 15:21
 */
public class ThreadDemo11 {
    public static void main(String[] args) {
        Thread.currentThread().interrupt();//设置当前中断状态为true
        //interrupted 如果当前线程已经中断，即中断状态时true，则返回true，同时清除中断状态，即中断状态为false
        System.out.println("First check: " + Thread.interrupted());
        System.out.println("Second check: " + Thread.interrupted());
    }
}
